import {get, post} from '../util/request/requests'

export default {
  login (loginData) {
    return post({
      url: '/user/login',
      params: loginData
    })
  },
  logout () {
    return get({
      url: '/user/logout'
    })
  },
  loadRouters () {
    return get({
      url: '/menu/getRouters'
    })
  },
  sendCode (mail) {
    return get({
      url: '/user/getCode',
      params: {mail}
    })
  },
  checkCode (registerParm) {
    return post({
      url: '/user/register',
      params: registerParm
    })
  }
}
